#include "myDeque.hpp"
#include <iostream>
#include <string.h>
using namespace std;

struct dataNode
{
    void *dataPtr;
    struct dataNode *next;
    struct dataNode *prev;
};

struct dataNode *create()
{
    struct dataNode *tmp = new struct dataNode;
    if(tmp==NULL)   return tmp;
    tmp->dataPtr = NULL;
    tmp->next = tmp->prev = tmp;

    return tmp;
}
int insert_back(struct dataNode *n, struct dataNode *o)
{
    if(n==NULL||o==NULL)
        return -1;
    o->next->prev = n;
    n->next = o->next;
    o->next = n;
    n->prev = o;
    return 0;
}
int insert_front(struct dataNode *n, struct dataNode *o)
{
    if(n==NULL||o==NULL)
        return -1;
    o->prev->next = n;
    n->prev = o->prev;
    n->next = o;
    o->prev = n;
    return 0;
}

dequebase::dequebase()
{
    current_size = 0;
    max_size = 10;
    head = last = first = NULL;
}
dequebase::dequebase(int size)
{
    current_size = 0;
    max_size = size;
    while(size--)   push_back(NULL);
}
dequebase::dequebase(dequebase& n, int size)
{
    if(n==NULL)
    ;
    else
    {
        for(int i = 0; i<size && i< n.max_size ; i++)
        {
            
        }
    }
}
virtual dequebase::~dequebase(){}

void *dequebase::push_back(void*)
{
    
}
void *dequebase::push_front(void*){}{}
void *dequebase::pop_back()
{

}
void *dequebase::pop_front(){}
